package com.xing.binbackend.pattern.strategy33.operation.performance;

import com.xing.binbackend.topology.model.Edge;
import com.xing.binbackend.topology.model.Vertex;

import java.util.ArrayList;
import java.util.List;

public class CollectorProcessor {
    private final List<CollectorStrategy> strategies = new ArrayList<>();

    // 注册请求策略
    public void register(CollectorStrategy strategy) {
        strategies.add(strategy);
    }

    // 处理请求
    public void processRequest(List<Vertex> vertices, List<Edge> edges) {
        for (CollectorStrategy strategy : strategies) {
            strategy.process(vertices, edges);
        }
    }
}
